package PTA.Mianxiangduixiang.ex03;

import Person.ith_34.Ma;

import java.util.Arrays;
import java.util.Scanner;
class Rectangle{
    private int width;
    private int length;
    Rectangle(){}
    Rectangle(int width,int length){
        this.width=width;
        this.length = length;
    }
public int getPerimeter(){

        return (width+length)*2;
}
public int getArea(){
        return width*length;
}
    @Override
    public String toString() {
        return "Rectangle [" +
                "width=" + width +
                ", length=" + length +
                ']';
    }
}
class Circle{
    private int radius;
    private double s=0;
    Circle(){}
    Circle(int radius){
        this.radius=radius;
    }
    public int getPerimeter(){
      s=(2*Math.PI*radius);
      return (int)s;
    }
public int getArea(){
        s=(Math.PI*radius*radius);
        return (int)s;
}
    @Override
    public String toString() {
        return "Circle [" +
                "radius=" + radius +
                ']';
    }
}


public class ex03 {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
 Rectangle r[] = new Rectangle[2];
r[0]=new Rectangle(sc.nextInt(),sc.nextInt());
r[1]=new Rectangle(sc.nextInt(),sc.nextInt());
Circle c[]=new Circle[2];
c[0]=new Circle(sc.nextInt());
c[1]=new Circle(sc.nextInt());


        System.out.println(r[0].getPerimeter()+r[1].getPerimeter()+c[0].getPerimeter()+c[1].getPerimeter());
        System.out.println(r[0].getArea()+r[1].getArea()+c[0].getArea()+c[1].getArea());
        System.out.println(Arrays.deepToString(r));
        System.out.println(Arrays.deepToString(c));
    }
}
